package webmarket.controller.transferobjects;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;

import webmarket.common.CommonMethods;
import webmarket.common.XmlBase;
import webmarket.model.Shopcategory;

@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class ShopcategoryTO extends XmlBase {
	private static final long serialVersionUID = 1964311534555823119L;
	private int id;
	private String name;
	private String label;
	private String description;

	public ShopcategoryTO(Shopcategory cat) {
		this.id = cat.getId();
		this.name = cat.getName();
		this.setLabel(CommonMethods.printCategory(cat));
		this.description = cat.getDescription();
	}

	/**
	 * @return the id
	 */
	public int getId() {
		return id;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(int id) {
		this.id = id;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name
	 *            the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * @param description
	 *            the description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}

	/**
	 * @return the label
	 */
	public String getLabel() {
		return label;
	}

	/**
	 * @param label the label to set
	 */
	public void setLabel(String label) {
		this.label = label;
	}
}
